The Internet is a global interconnection of computer networks that share a set of well-defined data communication protocols. Specifically, most computer networks coupled to the global Internet communicate using the Transport Control Protocol (TCP) and Internet Protocol (IP).
A very large portion of the computers communicate on the global Internet are coupled to a local area network (LAN) that is coupled to the global Internet with an Internet gateway. The Internet gateway handles all communication between computers on the local area network and computers out on the global Internet. The Internet gateway may perform many different functions such as network address translation, network caching, routing, and packet filtering.
Packet filtering is the task of examining each packet to apply a set of filtering rules. Each packet filtering rule specifies a particular packet filtering policy. For example, all packets incoming from the Internet that are destined for vulnerable server ports may be discarded in order to protect the internal servers on the local area network.
The number of packet filtering rules that are needed depends on the particular application. In simple packet filtering routers for small or home routers, the number of packet filtering rules is relatively small. However, an internet service provider (ISP) that provides classes of service for the internet service provider's customers, the internet service provider will need many thousands of packet filter rules to implement the class of service priority and other customer features.
There are several different current implementations of packet filtering rule processors. The simplest implementation of a rules processor is a linear searching rule processor. In such an implementation, the linear rule processor tests each received packet against each rule in the list of packet filtering rules. The time required to perform this type of rule processing is directly proportional to the number of packet filtering rules. This type of linear rule processing is not feasible for any system with a large number of packet filtering rules.
To provide faster rule processing, improved methods of applying packet filtering rules were introduced. One improved method is known as “rule splitting” A rule splitting system divides the rules into several different sets of rules. When a packet is received, one or more aspects of the packet are examined to determine which subset of rules should be applied. For example, a rule splitting type of rule processor may only examine the Source and/or Destination ports of each packet in order to determine which set of rules to apply. Rule splitting type of rule processors are difficult to implement because rules have ranges associated with them.
Search trees provide another method of improving rule processing speed. Search trees divide the rules into a preprocessed organized format that improves the rule processing to a speed that is a logarithmic function of the number of rules in each dimension. This type of searching works well, but still does not provide a solution that is viable for high-speed network applications that require many thousands of rules. It would therefore be desirable to have an improved network rule processor that can process thousands of network rules.